-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compose for Web: Initial IME support #1085
Compose for Web: Initial IME support #1085
Conversation
@eymar Hello. Can you help me with this PR? |
compose/ui/ui/src/jsWasmMain/kotlin/androidx/compose/ui/window/ComposeWindow.js.kt
Outdated
Show resolved
Hide resolved
@eymar Hello, is there any news on my PR? |
Hi @jershell ! Thanks for a ping. The feature you implemented is really important and we appreciate your contribution :) We would like to carefuly evaluate this solution with its nuances and the possible alternatives if they are necessary. |
@eymar Hello, any news? |
No news yet :) |
# Conflicts: # compose/ui/ui/src/webCommonW3C/kotlin/androidx/compose/ui/window/ComposeWindow.js.kt
# Conflicts: # compose/ui/ui/src/webCommonW3C/kotlin/androidx/compose/ui/window/ComposeWindow.js.kt
I pulled latest master. Now we have a bug. The click does not hit on widget. I mention that the bug is not mine -_- and the keyboard works, you just need to press higher (about 50-60dp). |
# Conflicts: # compose/mpp/demo/src/jsMain/resources/index.html # compose/mpp/demo/src/wasmJsMain/resources/index.html # compose/ui/ui/src/webCommonW3C/kotlin/androidx/compose/ui/window/ComposeWindow.js.kt
@eymar Hello. I see version 1.6.10*** got it. Does this mean that we can soon merge this PR? |
@jershell does the keyboard now show up if I use v1.6.10-dev1551? |
no, only after the merger |
@eymar hi, any news? |
@jershell Hi jershell, I'd had to recompose you PR due to the changes in our event-related approach in general, but don't think that your contribution is wasted - it's actually quite the opposite, we've based our changes on the work you provided (and make sure that the authorship will be preserved in the final merge that's yet to be) you can check #1259 for further progress |
Proposed Changes
This PR is an attempt to provide basic support and accumulate knowledge about the state of affairs with keyboard (ime) in mobile web browsers
Testing
chrome on mobile device - ok
safari on mobile device - ok
Test:
Desktop browsers are not affected.
On mobile devices the keyboard is visible and works =\
Google CLA
OK
Working demo
Screenrecorder-2024-02-08-18-26-48-399.mp4
Demo problems
Screenrecorder-2024-02-08-18-27-39-629.mp4
Comments
user-scalable=0 set to 0 to prevent default zoom in safari browser
Limitations
Note
Based on the information at this time, several implementation options are likely.
Note
The keyboard changes the current viewPort, which does not work exactly, perhaps on google chrome you can use https://developer.chrome.com/blog/viewport-resize-behavior, but it is not clear what to do with safari
Additional. Why is the VirtualKeyboard API not used.
Summary of the VirtualKeyboard API https://w3c.github.io/virtual-keyboard/ at 2024
virtualkeyboardpolicy="manual"
attributes.Note
browser_compatibility